#include "stdafx.h"
#include "wf_zoomprevious.h"


/**
 * Constructor.
 */
WF_ZoomPrevious::WF_ZoomPrevious(PF_Container& container,
                                     PF_GraphicView& graphicView)
        :PF_ActionInterface("Previous zoom", container, graphicView) {

}


QAction* WF_ZoomPrevious::createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/) {
	// tr("Previous View")
	QAction* action = new QAction(tr("&Previous View"), NULL);
#if QT_VERSION >= 0x040600
        action->setIcon(QIcon::fromTheme("zoom-previous", QIcon(":/actions/zoomprevious.png")));
#else
        action->setIcon(QIcon(":/actions/zoomprevious.png"));
#endif
        //action->zetStatusTip(tr("Shows previous view"));
	
	return action;
}


void WF_ZoomPrevious::init(int status) {
    PF_ActionInterface::init(status);
    trigger();
}



void WF_ZoomPrevious::trigger() {
    graphicView->zoomPrevious();
    finish();
}

// EOF
